import { useState } from 'react';
import styles from './index.less';
import { Button } from 'antd';
// @umijs/preset-react低版本的默认使用的是V2
import { Button as V2Button } from 'antd-mobile-v2';
import { Button as V5Button } from 'antd-mobile';
export default function IndexPage() {
  const [count, setCount] = useState(0);
  return (
    <div>
      <h1 className={styles.title}>Page index</h1>

      {/* less样式的写法 */}
      <h2>变量-全局</h2>
      <div className="myLink">测试</div>
      <div className={styles.title}>测试</div>
      <div className={styles.nesting}>
        <h3>测试</h3>
        <p>测试</p>
      </div>
      <div>{count}</div>
      <Button type="primary" onClick={() => setCount(count + 1)}>
        主要按钮
      </Button>
      <V2Button
        type="primary"
        size="small"
        inline
        onClick={() => setCount(count + 1)}
      >
        主要按钮
      </V2Button>
      <V5Button color="primary" size="mini" onClick={() => setCount(count + 1)}>
        主要按钮
      </V5Button>
    </div>
  );
}
